home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 12 / Mac Magazin and MacEasy Magazine CD - Issue 12.iso / Sharewarebibliothek / Anwendungen / Musik / MIDI Pack'en 1.1.2 / Sample Scripts / 26 Change port connection < prev   
Text File  |  1995-03-22  |  421b  |  23 lines

  1. tell application "MIDI Pack'en"
  2.     activate -- if needed
  3.     set flag to true
  4.     repeat while flag
  5.         try
  6.             copy Word 1 of Text 1 of Window 1 to str
  7.         on error
  8.             set flag to false
  9.         end try
  10.         if flag then
  11.             if str is "Modem" then
  12.                 Connect Modem Port true
  13.                 Connect Printer Port false
  14.             else
  15.                 Connect Modem Port false
  16.                 Connect Printer Port true
  17.             end if
  18.             Transmit
  19.             Close Window 1
  20.         end if
  21.     end repeat
  22. end tell
  23.